/*
 * @Description: 
 * @Author: zoe
 * @Date: 2024-09-13 10:32:54
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-13 14:50:25
 */
//成员变量
//私有
public class Animal{
    //私有
    private String name;//名字
    //公开
    public int number;//数量
    //set get
    //name
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return name;
    }
    //number
    public void setNumber(int number){
        this.number = number;
    }
    public int getNumber(){
        return number;
    }
    public void sayHello(){
        System.out.println("自有name:"+name);
        System.out.println("自有number:"+number);
    }

}
